let g:vista#renderer#enable_icon = 1
let g:vista_disable_statusline = 0
let g:vista_sidebar_position = 'vertical topleft'
let g:vista_sidebar_width = 30
let g:vista_fzf_preview = ['right:50%']
"let g:vista_echo_cursor_strategy = 'floating_win'
let g:vista_vimwiki_executive = 'markdown'
let g:vista_executive_for = {
  \ 'vimwiki': 'markdown',
  \ 'pandoc': 'markdown',
  \ 'markdown': 'toc',
  \ }
if  exists("g:uselsp")
  let g:vista_default_executive = 'nvim_lsp'
else
  let g:vista_default_executive = 'coc'
endif




function! NearestMethodOrFunction() abort
  return get(b:, 'vista_nearest_method_or_function', '')
endfunction

function! s:load_vista() abort
  set statusline+=%{NearestMethodOrFunction()}
" By default vista.vim never run if you don't call it explicitly.
"
" If you want to show the nearest function in your statusline automatically,
" you can add the following line to your vimrc
  autocmd VimEnter * call vista#RunForNearestMethodOrFunction()
  let g:vista_icon_indent = ["╰─▸ ", "├─▸ "]
  "let g:vista_executive_for = {
  "\ 'cpp': 'coc',
  "\ }
endfunction
" call s:load_vista()


